From 2114719e9f0aa3d4b7187a1e7e17205803169409 Mon Sep 17 00:00:00 2001 From: Steven Tamm Date: Tue, 10 Dec 2002 16:47:49 +0000 Subject: [PATCH] Fixed OSX sys_read to not call select if IO is non-blocking --- src/mac.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mac.c b/src/mac.c index 439f900db5b..bf1915cbacd 100644 --- a/src/mac.c +++ b/src/mac.c @@ -32,6 +32,7 @@ Boston, MA 02111-1307, USA. */ #include #include #include +#include #if __MWERKS__ #include #endif @@ -2811,7 +2812,8 @@ int sys_read (fds, buf, nbyte) int r; /* Use select to block on IO while still checking for quit_char */ - if (!inhibit_window_system && !noninteractive) + if (!inhibit_window_system && !noninteractive && + ! (fcntl(fds, F_GETFL, 0) & O_NONBLOCK)) { FD_ZERO (&rfds); FD_SET (fds, &rfds); -- 2.30.2